CREATE TABLE [dbo].[TTDLOG_ERRO]
(
[CO_EMPR] [dbo].[TD_VC_002] NULL,
[CO_FILE] [dbo].[TD_VC_003] NULL,
[TI_AUXI_DOCU] [dbo].[TD_VC_001] NULL,
[CO_AUXI_DOCU] [dbo].[TD_VC_020] NULL,
[TI_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU] [dbo].[TD_VC_020] NULL,
[NU_IDEN] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTDLOG_ER__NU_ID__2B0043CC] DEFAULT ((0)),
[NU_ERRO] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTDLOG_ER__NU_ER__2BF46805] DEFAULT ((0)),
[FE_DOCU] [dbo].[TD_DT_001] NULL,
[FE_DOCU_VENC] [dbo].[TD_DT_001] NULL,
[FE_ASTO_CNTB] [dbo].[TD_DT_001] NULL,
[IM_DOCU_ORIG] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TTDLOG_ER__IM_DO__2CE88C3E] DEFAULT ((0)),
[CO_MONE] [dbo].[TD_VC_003] NULL,
[FA_CAMB] [dbo].[TD_NU_015_006] NULL,
[NU_CNTB_EMPR] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTDLOG_ER__NU_CN__2DDCB077] DEFAULT ((0)),
[CO_UNID_CNTB] [dbo].[TD_VC_003] NULL,
[CO_OPRC_CNTB] [dbo].[TD_VC_003] NULL,
[NU_ANNO] [dbo].[TD_IN_004_ANOS] NULL,
[NU_MESE] [dbo].[TD_IN_002_MESE] NULL,
[TI_OPER] [dbo].[TD_VC_003] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_AUXI_DIST] [dbo].[TD_VC_001] NULL,
[CO_AUXI_DIST] [dbo].[TD_VC_020] NULL,
[TI_DOCU_DIST] [dbo].[TD_VC_003] NULL,
[NU_DOCU_DIST] [dbo].[TD_VC_020] NULL,
[FE_DOCU_DIST] [dbo].[TD_DT_001] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[DE_GLOS] [dbo].[TD_VC_100] NULL,
[DE_ERRO] [dbo].[TD_VC_100] NULL,
[CO_CLAV_TAOR] [dbo].[TD_VC_100] NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NULL,
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTDLOG_ER__CO_US__30B91D22] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTDLOG_ER__FE_US__31AD415B] DEFAULT (getdate()),
[ID_DOCU] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TTDLOG_ER__ID_DO__32A16594] DEFAULT ((0)),
[NU_ASTO] [dbo].[TD_VC_020] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTDLOG_ERRO] WITH NOCHECK ADD CONSTRAINT [CK__TTDLOG_ER__NU_AN__2ED0D4B0] CHECK NOT FOR REPLICATION (([NU_ANNO]>(1980)))
GO
ALTER TABLE [dbo].[TTDLOG_ERRO] WITH NOCHECK ADD CONSTRAINT [CK__TTDLOG_ER__NU_ME__2FC4F8E9] CHECK NOT FOR REPLICATION (([NU_MESE]>=(0) AND [NU_MESE]<=(13)))
GO
